package com.yyh.fanshe;

public class Demo5 {
    public static void main(String[] args) throws ClassNotFoundException {
        //1.获取Class对象
        Class clas1 = Class.forName("com.yyh.fanshe.User");
        //2.获取clas1类对象的全类型名称
        String name = clas1.getName();
        System.out.println("name = " + name);//name = com.yyh.fanshe.User
        System.out.println("------------------------------------------------");
        //3.获取clas1类对象简称
        String simpleName = clas1.getSimpleName();
        System.out.println("simpleName = " + simpleName);//simpleName = User
    }
}
